<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>getDefaultProps</title>
		<script src="//www.w3cschool.cn/statics/assets/react/react.min.js"></script>
		<script src="//www.w3cschool.cn/statics/assets/react/react-dom.min.js"></script>
		<script src="//www.w3cschool.cn/statics/assets/react/babel.min.js"></script>
	</head>
	<body>
		<div id="hello-example"></div>
		<script type="text/babel">
		var ShowTitle=React.createClass({
			getDefaultProps:function(){//设置默认值
				return{
					title:"Ceart"
				};
			},
			render:function(){
				return <h1>{this.props.title}</h1>
			}
		});
		
		ReactDOM.render(
			<ShowTitle/>,
			document.getElementById('hello-example')
		)	
		</script>
	</body>
</html>
